﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Package_Jeu;

namespace CivilisationIHM
{
    /// <summary>
    /// Logique d'interaction pour MainWindow.xaml
    /// </summary>
    public partial class FinPartie : Window
    {
        Joueur gagnant;
        public FinPartie(Joueur j)
        {
            InitializeComponent();
            String chemin = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"..\..\..\Images\";
            Uri iconUri = new Uri(chemin + "king.ico");
            this.Icon = BitmapFrame.Create(iconUri);
            gagnant = j;
            Victoire.Content = "Bravo " + gagnant.pseudonyme + ", tu as vaincu ces gueux.";
        }

        private void NouvellePartie(object sender, RoutedEventArgs e)
        {
            Menu menu = new Menu();
            App.Current.MainWindow = menu;
            this.Close();
            menu.Show();
        }

        private void ChargerPartie(object sender, RoutedEventArgs e)
        {
            MainWindow main = new MainWindow();
            App.Current.MainWindow = main;
            this.Close();
            main.Show();
        }

        
    }
}
